<?php 
require("header.php");
require("left.php");
?>
<?php
require("admin/conn.php");
session_start();
$Art_id=$_GET['Art_id'];
$sql_add_vnum="UPDATE  artcontent SET vnum=vnum+1 WHERE Art_id='$Art_id'";
mysql_query($sql_add_vnum) OR die("<br/>ERROR:<b>".mysql_error()."</b><br/>SQL:".$sql);
$sql="SELECT * FROM artcontent  where Art_id=".$_GET['Art_id']." ORDER BY PostData DESC ";
$result=mysql_query($sql);
$row=mysql_fetch_array($result);
?>
	<div id="main">		 
            <div class="artical">
			         <h4><?php echo $row['Title']; ?></h4>
					 <p class="time"><?php echo $row['PostData']; ?></p>
					 <p class="content"><?php echo $row['Content']; ?></p>
		    </div>
			<br/><br/>
			<div class="artical">
	        <p class="special">评论：</p>
			<hr/>
           <div class="comment">
				<?php
				$sql="SELECT * FROM  artr   where Art_id=".$_GET['Art_id'];
				$result=mysql_query($sql);
				if($num = mysql_num_rows($result)==0)
				{
				    echo "<p>没有评论</p>";}
                    else{
					while($row = mysql_fetch_array($result,MYSQL_ASSOC))
					{
				?>
								<p class="content">昵称：<?php echo $row['R_name'] ?></p>
								<p class="time"><?php echo $row['R_Data'] ?></p>
								<p class="content"><?php echo $row['R_content'] ?></p>
								<p class="content">Email：&nbsp;&nbsp;&nbsp;<?php echo $row['R_email'] ?></p>
			<hr/>
				<?php
				}}
				?>
			</div>	
           
		   <br/>
		   <div class="artical">
				<form name="r" action="admin/addr.php?Art_id=<?php echo $Art_id ;?>" method="post">
					<p>名&nbsp;&nbsp;&nbsp;字：&nbsp;&nbsp;<input name="R_name" type="text" /></p>
					<p>E-mail：&nbsp;&nbsp;</th><input name="R_email" type="text" /></p>
					<p>
			        <textarea name="R_content" id="R_content" rows="50" cols="152" style="width: 480px; height: 200px">在这里写留言</textarea> 
					<input name="留言" type="submit" id="留言" value="留言" />
				    </p>
			    </form>
			    <script charset="utf-8" src="editor/kindeditor-min.js"></script>
					<script>
						KE.show({
							id : 'R_content',
							urlType : 'absolute',
							width: '560px',
							resizeMode:0,
							allowUpload : false,
							filterMode : true,
										items : [
							'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
							'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
							'insertunorderedlist', '|', 'emoticons', 'image', 'link']
						});
				</script>
        </div>

		</div>
	</div>
			 
<?php
require("footer.php");
?>